<?php
include('../incsession.php');

include("timer.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sample page</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<script type="text/javascript" src="jquery.min.js"></script>
<style type="text/css">
.assoc_msg{
  position:absolute;
  z-index:10;   
  width:35px;
  height:35px;
  text-align:center;
  background:url(img/association.png) bottom right no-repeat;
  display:none;
}
.dict_msg{
  position:absolute;
  z-index:10;   
  width:35px;
  height:35px;
  text-align:center;
  background:url(img/question.png) bottom right no-repeat;
  display:none;
}
</style>
</head>

<body onLoad="TimeCountDown()">

<input id="assoc_text" type="hidden">
<div id="assoc_div" class="assoc_msg" onClick="assoc()"></div>
<input id="dict_text" type="hidden">
<div id="dict_div" class="dict_msg" onClick="dict(),assoc()"></div>

<div id="wrapper">
	<div id="header">
		<div id="logo"></div>
		<div id="menu">
        <?php
			include("menu.php");
		?>
        <!--
			<a href="">首頁</a> | <a href="">成績</a> | <a href="">註冊班級</a> | <a href="">帳號</a> | <a href="">線上聽力</a> | <a href="">聯絡我們</a> | <a href="">版本說明</a>
            !-->
		</div>
	</div>
	<div class="clearer"></div>
	<div class="edge-top"></div>

	<div id="main">

		<div id="title">選擇題<font size=4><br></font></div>
<hr/><br><br>

<!-- 內文開始 !-->
<form method = "POST" action="mc_answers.php" >
<?php


$query = "SELECT * FROM multiple_choice WHERE topicid=".$_SESSION['topic']." AND level=".$_SESSION['level'];
$result = mysql_query($query,$orcp_con);


$i = 1;

while($row = mysql_fetch_array($result)){
	$string = 'your_answer'.$i;
	$choice = $_POST[$string];	

	echo $i;	
	echo (". ".$row['question']."<br>");
	echo "<Input type = 'Radio' Name ='your_answer".$i."' value='".$row['a']."'";
	if($choice==$row['a']) echo " checked";
	echo ">".$row['a']."<br>";	
	
	echo "<Input type = 'Radio' Name ='your_answer".$i."' value='".$row['b']."'";
	if($choice==$row['b']) echo " checked";
	echo ">".$row['b']."<br>";	
	
	echo "<Input type = 'Radio' Name ='your_answer".$i."' value='".$row['c']."'";
	if($choice==$row['c']) echo " checked";
	echo ">".$row['c']."<br>";	
	
	echo "<br><br>";	
	
	$i++;
}

?>

<div class="btn_right"><input type="submit" name = "next" value = "參考答案"></div>
</form>
<!-- 內文結束 !-->

	</div>
    <div class="edge-bottom"></div>
    <div id="footer"><?php  include("footer.php"); ?></div>
</div>

<div id="txt">18:27</div>
<input type="hidden" name="record_count" value=0>
<span id="record_arry"></span>


</body>
</html>